import Search from '@/views/Search'
import Home from '@/views/Home'
import Login from '@/views/Login'
import Register from '@/views/Register'
export default [
    // 路由重定向
    {
        path: '/',
        redirect:'/home'
    },
    // Search组件
    {
        name:'search',
        path: "/search/:keyword?",
        component:Search,
        // 函数传参
        props:(route)=>({...route.params,...route.query}),
        meta:{footerShow:true},
    },
    // Home组件
    {
        name:'home',
        path: '/home',
        component:Home,
        meta:{footerShow:true}
    },
    // Login组件
    {
        name:'login',
        path: '/login',
        component:Login,
        meta:{footerShow:false}
    },
    // Register
    {
        name:'register',
        path: '/register',
        component:Register,
        meta:{footerShow:false}
    }
]